<?php

/**
 * PeutAcceder form base class.
 *
 * @method PeutAcceder getObject() Returns the current form's model object
 *
 * @package    symfony
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BasePeutAccederForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_element'    => new sfWidgetFormInputHidden(),
      'id_user'       => new sfWidgetFormInputHidden(),
      'id_type_acces' => new sfWidgetFormInputHidden(),
      'created_at'    => new sfWidgetFormDateTime(),
      'updated_at'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id_element'    => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_element')), 'empty_value' => $this->getObject()->get('id_element'), 'required' => false)),
      'id_user'       => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_user')), 'empty_value' => $this->getObject()->get('id_user'), 'required' => false)),
      'id_type_acces' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_type_acces')), 'empty_value' => $this->getObject()->get('id_type_acces'), 'required' => false)),
      'created_at'    => new sfValidatorDateTime(),
      'updated_at'    => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('peut_acceder[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'PeutAcceder';
  }

}
